Conversation
default-config.json
Outdated
| "alias": "Cadence play " | ||
| } | ||
| ], | ||
| "commandFriendlyNames": { |
There was a problem hiding this comment.
Should we merge this with commandDescriptions?
ie
"commandDescriptions": {
"play": {
"description": "Starts playing Cadence in your voice channel",
"friendly": "play"
},
...
} There was a problem hiding this comment.
Oh yes, good idea
There was a problem hiding this comment.
I suppose if we do that it should be clear and say friendlyName or something though, shouldn't it...
There was a problem hiding this comment.
Yeah, friendlyName is probably best. I'll make it that.
default-config.json
Outdated
| } | ||
| ], | ||
| "commandFriendlyNames": { | ||
| "play": "play", |
There was a problem hiding this comment.
Just a thought - Is it worse to pollute config with these friendly names that match the key, or... Maybe we could default the friendly name to the key if it's not present?
Hm, that seems harder than it's worth. But just a thought...
There was a problem hiding this comment.
Hmm, I think it'll be easy enough on the code side and intuitive enough from the config side so I'll add it then unless you decide against it
There was a problem hiding this comment.
If you think a default isnt too much trouble I'm a fan. Just don't invest too much effort into it, I'm not demanding you add it.
default-config.json
Outdated
| "It can be used in one of two ways:", | ||
| " 1. Without any argument (`%help`), it will generate a summary of commands and a brief snippet of their purpose.", | ||
| " 2. Provided the name of a command (`%helpTopic help`), it will provide details regarding the specific usage of that command." | ||
| " 1. Without any argument (`%friendly:help`), it will generate a summary of commands and a brief snippet of their purpose.", |
There was a problem hiding this comment.
This begs the question of when we should use friendly name vs canonical (an invocation)
So here, are we saying without any argument as in help, or are we saying "if you run it without any argument by sending the message Cadence help"?
Adding the friendly name creates the writing style concern of when you write a friendly name to refer to the command, and when you write the invocation of the command - For example, I might write "%friendly:search results will be saved for a future use of %request to select a song."
Not saying this is necessarily wrong, mind you - but we should try to avoid letting ourselves mindlessly use one form or the other, now that you're giving us the freedom of using either.
There was a problem hiding this comment.
Oh yeah, I wasn't thinking here and blindly changed all the canonical names into friendly names. It seems these should all be left as canonical names except the use in nowplaying command's help text
za419
left a comment
There was a problem hiding this comment.
I still have some questions about the details, but I have no strong objections to merging.
| ); | ||
| return; | ||
| } else if (targetTopicAliases.includes(detailsObject.alias)) { | ||
| targetTopicAliases.push(detailsObject.alias) |
There was a problem hiding this comment.
Why are we pushing this onto the array that already contains it before returning?
There was a problem hiding this comment.
Oh yes, it's just for the join in the warning log which gets printed below, e.g. "Help topic nowplaying is part of an alias loop: nowplaying > nowplaying"
There was a problem hiding this comment.
Maybe I can add a comment to make this clearer?
There was a problem hiding this comment.
Ah, I see. Yeah, I'd usually expect that to be a '+= > ${detailsObject.alias} sort of expression...
A comment is fine. Thanks
Draft PR with a single commit to show how I'm planning on changing the config to do 'friendly names' of commands from the config. Will convert to full PR once bot.js changes are finished and tested.